3.1.87 \(\int \cos ^{12}(c+d x) (a+i a \tan (c+d x))^8 \, dx\) [87]

Optimal. Leaf size=55 \[ -\frac {i a^{14}}{3 d (a-i a \tan (c+d x))^6}+\frac {i a^{13}}{5 d (a-i a \tan (c+d x))^5} \]

[Out]

-1/3*I*a^14/d/(a-I*a*tan(d*x+c))^6+1/5*I*a^13/d/(a-I*a*tan(d*x+c))^5

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 55, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {3568, 45} \begin {gather*} \frac {i a^{13}}{5 d (a-i a \tan (c+d x))^5}-\frac {i a^{14}}{3 d (a-i a \tan (c+d x))^6} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]^12*(a + I*a*Tan[c + d*x])^8,x]

[Out]

((-1/3*I)*a^14)/(d*(a - I*a*Tan[c + d*x])^6) + ((I/5)*a^13)/(d*(a - I*a*Tan[c + d*x])^5)

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 3568

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[1/(a^(m - 2)*b
*f), Subst[Int[(a - x)^(m/2 - 1)*(a + x)^(n + m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x
] && EqQ[a^2 + b^2, 0] && IntegerQ[m/2]

Rubi steps

\begin {align*} \int \cos ^{12}(c+d x) (a+i a \tan (c+d x))^8 \, dx &=-\frac {\left (i a^{13}\right ) \text {Subst}\left (\int \frac {a+x}{(a-x)^7} \, dx,x,i a \tan (c+d x)\right )}{d}\\ &=-\frac {\left (i a^{13}\right ) \text {Subst}\left (\int \left (\frac {2 a}{(a-x)^7}-\frac {1}{(a-x)^6}\right ) \, dx,x,i a \tan (c+d x)\right )}{d}\\ &=-\frac {i a^{14}}{3 d (a-i a \tan (c+d x))^6}+\frac {i a^{13}}{5 d (a-i a \tan (c+d x))^5}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.80, size = 77, normalized size = 1.40 \begin {gather*} \frac {a^8 (45+64 \cos (2 (c+d x))+20 \cos (4 (c+d x))-16 i \sin (2 (c+d x))-10 i \sin (4 (c+d x))) (-i \cos (8 (c+d x))+\sin (8 (c+d x)))}{960 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]^12*(a + I*a*Tan[c + d*x])^8,x]

[Out]

(a^8*(45 + 64*Cos[2*(c + d*x)] + 20*Cos[4*(c + d*x)] - (16*I)*Sin[2*(c + d*x)] - (10*I)*Sin[4*(c + d*x)])*((-I
)*Cos[8*(c + d*x)] + Sin[8*(c + d*x)]))/(960*d)

________________________________________________________________________________________

Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 638 vs. \(2 (47 ) = 94\).
time = 0.25, size = 639, normalized size = 11.62 Too large to display

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^12*(a+I*a*tan(d*x+c))^8,x,method=_RETURNVERBOSE)

[Out]

1/d*(a^8*(-1/12*sin(d*x+c)^7*cos(d*x+c)^5-7/120*sin(d*x+c)^5*cos(d*x+c)^5-7/192*sin(d*x+c)^3*cos(d*x+c)^5-7/38
4*sin(d*x+c)*cos(d*x+c)^5+7/1536*(cos(d*x+c)^3+3/2*cos(d*x+c))*sin(d*x+c)+7/1024*d*x+7/1024*c)-8*I*a^8*(-1/12*
sin(d*x+c)^6*cos(d*x+c)^6-1/20*sin(d*x+c)^4*cos(d*x+c)^6-1/40*sin(d*x+c)^2*cos(d*x+c)^6-1/120*cos(d*x+c)^6)-28
*a^8*(-1/12*sin(d*x+c)^5*cos(d*x+c)^7-1/24*sin(d*x+c)^3*cos(d*x+c)^7-1/64*sin(d*x+c)*cos(d*x+c)^7+1/384*(cos(d
*x+c)^5+5/4*cos(d*x+c)^3+15/8*cos(d*x+c))*sin(d*x+c)+5/1024*d*x+5/1024*c)+56*I*a^8*(-1/12*sin(d*x+c)^4*cos(d*x
+c)^8-1/30*sin(d*x+c)^2*cos(d*x+c)^8-1/120*cos(d*x+c)^8)+70*a^8*(-1/12*sin(d*x+c)^3*cos(d*x+c)^9-1/40*cos(d*x+
c)^9*sin(d*x+c)+1/320*(cos(d*x+c)^7+7/6*cos(d*x+c)^5+35/24*cos(d*x+c)^3+35/16*cos(d*x+c))*sin(d*x+c)+7/1024*d*
x+7/1024*c)-56*I*a^8*(-1/12*sin(d*x+c)^2*cos(d*x+c)^10-1/60*cos(d*x+c)^10)-28*a^8*(-1/12*sin(d*x+c)*cos(d*x+c)
^11+1/120*(cos(d*x+c)^9+9/8*cos(d*x+c)^7+21/16*cos(d*x+c)^5+105/64*cos(d*x+c)^3+315/128*cos(d*x+c))*sin(d*x+c)
+21/1024*d*x+21/1024*c)-2/3*I*a^8*cos(d*x+c)^12+a^8*(1/12*(cos(d*x+c)^11+11/10*cos(d*x+c)^9+99/80*cos(d*x+c)^7
+231/160*cos(d*x+c)^5+231/128*cos(d*x+c)^3+693/256*cos(d*x+c))*sin(d*x+c)+231/1024*d*x+231/1024*c))

________________________________________________________________________________________

Maxima [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 162 vs. \(2 (43) = 86\).
time = 0.53, size = 162, normalized size = 2.95 \begin {gather*} -\frac {3 \, a^{8} \tan \left (d x + c\right )^{7} - 20 i \, a^{8} \tan \left (d x + c\right )^{6} - 57 \, a^{8} \tan \left (d x + c\right )^{5} + 90 i \, a^{8} \tan \left (d x + c\right )^{4} + 85 \, a^{8} \tan \left (d x + c\right )^{3} - 48 i \, a^{8} \tan \left (d x + c\right )^{2} - 15 \, a^{8} \tan \left (d x + c\right ) + 2 i \, a^{8}}{15 \, {\left (\tan \left (d x + c\right )^{12} + 6 \, \tan \left (d x + c\right )^{10} + 15 \, \tan \left (d x + c\right )^{8} + 20 \, \tan \left (d x + c\right )^{6} + 15 \, \tan \left (d x + c\right )^{4} + 6 \, \tan \left (d x + c\right )^{2} + 1\right )} d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^12*(a+I*a*tan(d*x+c))^8,x, algorithm="maxima")

[Out]

-1/15*(3*a^8*tan(d*x + c)^7 - 20*I*a^8*tan(d*x + c)^6 - 57*a^8*tan(d*x + c)^5 + 90*I*a^8*tan(d*x + c)^4 + 85*a
^8*tan(d*x + c)^3 - 48*I*a^8*tan(d*x + c)^2 - 15*a^8*tan(d*x + c) + 2*I*a^8)/((tan(d*x + c)^12 + 6*tan(d*x + c
)^10 + 15*tan(d*x + c)^8 + 20*tan(d*x + c)^6 + 15*tan(d*x + c)^4 + 6*tan(d*x + c)^2 + 1)*d)

________________________________________________________________________________________

Fricas [A]
time = 0.40, size = 76, normalized size = 1.38 \begin {gather*} \frac {-5 i \, a^{8} e^{\left (12 i \, d x + 12 i \, c\right )} - 24 i \, a^{8} e^{\left (10 i \, d x + 10 i \, c\right )} - 45 i \, a^{8} e^{\left (8 i \, d x + 8 i \, c\right )} - 40 i \, a^{8} e^{\left (6 i \, d x + 6 i \, c\right )} - 15 i \, a^{8} e^{\left (4 i \, d x + 4 i \, c\right )}}{960 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^12*(a+I*a*tan(d*x+c))^8,x, algorithm="fricas")

[Out]

1/960*(-5*I*a^8*e^(12*I*d*x + 12*I*c) - 24*I*a^8*e^(10*I*d*x + 10*I*c) - 45*I*a^8*e^(8*I*d*x + 8*I*c) - 40*I*a
^8*e^(6*I*d*x + 6*I*c) - 15*I*a^8*e^(4*I*d*x + 4*I*c))/d

________________________________________________________________________________________

Sympy [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 197 vs. \(2 (42) = 84\).
time = 0.67, size = 197, normalized size = 3.58 \begin {gather*} \begin {cases} \frac {- 3932160 i a^{8} d^{4} e^{12 i c} e^{12 i d x} - 18874368 i a^{8} d^{4} e^{10 i c} e^{10 i d x} - 35389440 i a^{8} d^{4} e^{8 i c} e^{8 i d x} - 31457280 i a^{8} d^{4} e^{6 i c} e^{6 i d x} - 11796480 i a^{8} d^{4} e^{4 i c} e^{4 i d x}}{754974720 d^{5}} & \text {for}\: d^{5} \neq 0 \\x \left (\frac {a^{8} e^{12 i c}}{16} + \frac {a^{8} e^{10 i c}}{4} + \frac {3 a^{8} e^{8 i c}}{8} + \frac {a^{8} e^{6 i c}}{4} + \frac {a^{8} e^{4 i c}}{16}\right ) & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**12*(a+I*a*tan(d*x+c))**8,x)

[Out]

Piecewise(((-3932160*I*a**8*d**4*exp(12*I*c)*exp(12*I*d*x) - 18874368*I*a**8*d**4*exp(10*I*c)*exp(10*I*d*x) -
35389440*I*a**8*d**4*exp(8*I*c)*exp(8*I*d*x) - 31457280*I*a**8*d**4*exp(6*I*c)*exp(6*I*d*x) - 11796480*I*a**8*
d**4*exp(4*I*c)*exp(4*I*d*x))/(754974720*d**5), Ne(d**5, 0)), (x*(a**8*exp(12*I*c)/16 + a**8*exp(10*I*c)/4 + 3
*a**8*exp(8*I*c)/8 + a**8*exp(6*I*c)/4 + a**8*exp(4*I*c)/16), True))

________________________________________________________________________________________

Giac [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 437 vs. \(2 (43) = 86\).
time = 2.05, size = 437, normalized size = 7.95 \begin {gather*} -\frac {5 i \, a^{8} e^{\left (40 i \, d x + 26 i \, c\right )} + 94 i \, a^{8} e^{\left (38 i \, d x + 24 i \, c\right )} + 836 i \, a^{8} e^{\left (36 i \, d x + 22 i \, c\right )} + 4674 i \, a^{8} e^{\left (34 i \, d x + 20 i \, c\right )} + 18411 i \, a^{8} e^{\left (32 i \, d x + 18 i \, c\right )} + 54264 i \, a^{8} e^{\left (30 i \, d x + 16 i \, c\right )} + 124033 i \, a^{8} e^{\left (28 i \, d x + 14 i \, c\right )} + 224822 i \, a^{8} e^{\left (26 i \, d x + 12 i \, c\right )} + 327613 i \, a^{8} e^{\left (24 i \, d x + 10 i \, c\right )} + 386672 i \, a^{8} e^{\left (22 i \, d x + 8 i \, c\right )} + 370513 i \, a^{8} e^{\left (20 i \, d x + 6 i \, c\right )} + 287534 i \, a^{8} e^{\left (18 i \, d x + 4 i \, c\right )} + 179361 i \, a^{8} e^{\left (16 i \, d x + 2 i \, c\right )} + 34011 i \, a^{8} e^{\left (12 i \, d x - 2 i \, c\right )} + 9754 i \, a^{8} e^{\left (10 i \, d x - 4 i \, c\right )} + 1970 i \, a^{8} e^{\left (8 i \, d x - 6 i \, c\right )} + 250 i \, a^{8} e^{\left (6 i \, d x - 8 i \, c\right )} + 15 i \, a^{8} e^{\left (4 i \, d x - 10 i \, c\right )} + 88704 i \, a^{8} e^{\left (14 i \, d x\right )}}{960 \, {\left (d e^{\left (28 i \, d x + 14 i \, c\right )} + 14 \, d e^{\left (26 i \, d x + 12 i \, c\right )} + 91 \, d e^{\left (24 i \, d x + 10 i \, c\right )} + 364 \, d e^{\left (22 i \, d x + 8 i \, c\right )} + 1001 \, d e^{\left (20 i \, d x + 6 i \, c\right )} + 2002 \, d e^{\left (18 i \, d x + 4 i \, c\right )} + 3003 \, d e^{\left (16 i \, d x + 2 i \, c\right )} + 3003 \, d e^{\left (12 i \, d x - 2 i \, c\right )} + 2002 \, d e^{\left (10 i \, d x - 4 i \, c\right )} + 1001 \, d e^{\left (8 i \, d x - 6 i \, c\right )} + 364 \, d e^{\left (6 i \, d x - 8 i \, c\right )} + 91 \, d e^{\left (4 i \, d x - 10 i \, c\right )} + 14 \, d e^{\left (2 i \, d x - 12 i \, c\right )} + 3432 \, d e^{\left (14 i \, d x\right )} + d e^{\left (-14 i \, c\right )}\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^12*(a+I*a*tan(d*x+c))^8,x, algorithm="giac")

[Out]

-1/960*(5*I*a^8*e^(40*I*d*x + 26*I*c) + 94*I*a^8*e^(38*I*d*x + 24*I*c) + 836*I*a^8*e^(36*I*d*x + 22*I*c) + 467
4*I*a^8*e^(34*I*d*x + 20*I*c) + 18411*I*a^8*e^(32*I*d*x + 18*I*c) + 54264*I*a^8*e^(30*I*d*x + 16*I*c) + 124033
*I*a^8*e^(28*I*d*x + 14*I*c) + 224822*I*a^8*e^(26*I*d*x + 12*I*c) + 327613*I*a^8*e^(24*I*d*x + 10*I*c) + 38667
2*I*a^8*e^(22*I*d*x + 8*I*c) + 370513*I*a^8*e^(20*I*d*x + 6*I*c) + 287534*I*a^8*e^(18*I*d*x + 4*I*c) + 179361*
I*a^8*e^(16*I*d*x + 2*I*c) + 34011*I*a^8*e^(12*I*d*x - 2*I*c) + 9754*I*a^8*e^(10*I*d*x - 4*I*c) + 1970*I*a^8*e
^(8*I*d*x - 6*I*c) + 250*I*a^8*e^(6*I*d*x - 8*I*c) + 15*I*a^8*e^(4*I*d*x - 10*I*c) + 88704*I*a^8*e^(14*I*d*x))
/(d*e^(28*I*d*x + 14*I*c) + 14*d*e^(26*I*d*x + 12*I*c) + 91*d*e^(24*I*d*x + 10*I*c) + 364*d*e^(22*I*d*x + 8*I*
c) + 1001*d*e^(20*I*d*x + 6*I*c) + 2002*d*e^(18*I*d*x + 4*I*c) + 3003*d*e^(16*I*d*x + 2*I*c) + 3003*d*e^(12*I*
d*x - 2*I*c) + 2002*d*e^(10*I*d*x - 4*I*c) + 1001*d*e^(8*I*d*x - 6*I*c) + 364*d*e^(6*I*d*x - 8*I*c) + 91*d*e^(
4*I*d*x - 10*I*c) + 14*d*e^(2*I*d*x - 12*I*c) + 3432*d*e^(14*I*d*x) + d*e^(-14*I*c))

________________________________________________________________________________________

Mupad [B]
time = 3.40, size = 82, normalized size = 1.49 \begin {gather*} -\frac {a^8\,\left (3\,\mathrm {tan}\left (c+d\,x\right )-2{}\mathrm {i}\right )}{15\,d\,\left ({\mathrm {tan}\left (c+d\,x\right )}^6+{\mathrm {tan}\left (c+d\,x\right )}^5\,6{}\mathrm {i}-15\,{\mathrm {tan}\left (c+d\,x\right )}^4-{\mathrm {tan}\left (c+d\,x\right )}^3\,20{}\mathrm {i}+15\,{\mathrm {tan}\left (c+d\,x\right )}^2+\mathrm {tan}\left (c+d\,x\right )\,6{}\mathrm {i}-1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(c + d*x)^12*(a + a*tan(c + d*x)*1i)^8,x)

[Out]

-(a^8*(3*tan(c + d*x) - 2i))/(15*d*(tan(c + d*x)*6i + 15*tan(c + d*x)^2 - tan(c + d*x)^3*20i - 15*tan(c + d*x)
^4 + tan(c + d*x)^5*6i + tan(c + d*x)^6 - 1))

________________________________________________________________________________________